/*
 * Copyright (C) 2009 Ionut Dediu <deionut@yahoo.com>
 *
 * Licensed under the GNU General Public License Version 2
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

// SmartCamSettingsList.h

#ifndef __SMARTCAM_SETTINGS_LIST_H__
#define __SMARTCAM_SETTINGS_LIST_H__


#include <coecntrl.h>
#include <aknsettingitemlist.h>

#include "BtDiscoverer.h"

class CSmartCamSettingsData;

class CSmartCamSettingsList : public CAknSettingItemList, public MBtDiscoveryObserver
	{
public:
	static CSmartCamSettingsList* NewL(CSmartCamSettingsData& aSettingsData);
	static CSmartCamSettingsList* NewLC(CSmartCamSettingsData& aSettingsData);
	virtual ~CSmartCamSettingsList();
	void SizeChanged();
	void EditItemL(TInt aIndex, TBool aCalledFromMenu);
	// From MBtDiscoveryObserver:
	void RemoteDeviceSelected(TInt aErrorCode);
	void RemoteServiceFound(TInt aErrorCode);

private:
	CSmartCamSettingsList(CSmartCamSettingsData& aSettingsData);
	void ConstructL();
	void UpdateSettingItemsVisibility();
	CAknSettingItem* CreateSettingItemL(TInt aSettingId);
	void StartBtDiscovery();

private:
	CSmartCamSettingsData& iSettingsData;
	CBtDiscoverer* iBtDiscoverer;
	};

#endif//__SMARTCAM_SETTINGS_LIST_H__

